package com.itqf.controller;

import com.itqf.client.StreamClient;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/12/25
 * @Time: 下午5:06
 */

@RestController
public class SendController {
    @Resource
    private StreamClient streamClient;//

    @RequestMapping("/send")
   public  String   send(){

       streamClient.output().send(MessageBuilder.withPayload("hello world").build());

       return  "发送成功";
   }

}
